package com.taiyi.sqltoy.starter.context;

import lombok.Data;

/**
 * 用户信息数据载体
 * 
 * @author taiyi
 * @since 1.0.0
 */
@Data
public class UserInfo {

    /**
     * 用户ID
     */
    private String userId;

    /**
     * 用户名
     */
    private String username;

    /**
     * 租户ID
     */
    private String tenantId;

    /**
     * 用户角色
     */
    private String role;

    /**
     * 扩展属性
     */
    private Object extension;

    public UserInfo() {
    }

    public UserInfo(String userId, String username, String tenantId) {
        this.userId = userId;
        this.username = username;
        this.tenantId = tenantId;
    }

    public UserInfo(String userId, String username, String tenantId, String role) {
        this.userId = userId;
        this.username = username;
        this.tenantId = tenantId;
        this.role = role;
    }
}